using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BuildingBlocks.Abstractions.Permissions;

namespace Identity.Application.PermissionKeyResourceIds.Interfaces
{
    public interface IApiPermissionBindingReadService
    {
        Task<bool> IsUserCenterPermissionAsync(string permissionKey);

        Task<IReadOnlyCollection<PermissionBindingDto>> GetBindingsAsync(string? serviceName, CancellationToken ct = default);

        Task<IReadOnlyCollection<PermissionBindingDto>> GetBindingsByPermissionKeyAsync(string permissionKey, CancellationToken ct = default);
        
        Task<PermissionBindingDto?> GetBindingsByResourceIdAsync(string resourceId, CancellationToken ct = default);
    }
}